package com.wteam.PoJo.VO;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "region")
@ApiModel(value = "收货地址")
public class regionvo {
    @NotEmpty(message = "省份地址必填")
    @ApiModelProperty(value = "省份", required = true)
    private String province;

    @NotEmpty(message = "城市地址必填")
    @ApiModelProperty(value = "城市", required = true)
    private String urban;

    @NotEmpty(message = "地址必填")
    @ApiModelProperty(value = "详细地址", required = true)
    private  String fullAddress;

    @NotNull(message = "默认地址必填")
    @ApiModelProperty(value = "是否设为默认地址",example = "1为否，2为默认", required = true)
    private Integer defaultAddress;

    @NotEmpty(message = "收货人姓名必填")
    @ApiModelProperty(value = "收货人姓名",required = true)
    private String consignee;


    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    @ApiModelProperty(value = "电话号码",required = true)
    private String telephone;
}
